Integrand size = 37, antiderivative size = 159 \[ \int \frac {(a+b \sin (e+f x))^2}{(g \cos (e+f x))^{5/2} \sqrt {d \sin (e+f x)}} \, dx=\frac {2 \left (a^2+b^2\right ) \sqrt {d \sin (e+f x)}}{3 d f g (g \cos (e+f x))^{3/2}}+\frac {4 a b (d \sin (e+f x))^{3/2}}{3 d^2 f g (g \cos (e+f x))^{3/2}}+\frac {\left (2 a^2-b^2\right ) \operatorname {EllipticF}\left (\frac {1}{4} (4 e-\pi )+f x,2\right ) \sqrt {\sin (2 e+2 f x)}}{3 f g^2 \sqrt {g \cos (e+f x)} \sqrt {d \sin (e+f x)}} \]
[Out]
Time = 0.50 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.01, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.243, Rules used = {2990, 2643, 3281, 468, 335, 243, 342, 281, 238} \[ \int \frac {(a+b \sin (e+f x))^2}{(g \cos (e+f x))^{5/2} \sqrt {d \sin (e+f x)}} \, dx=-\frac {2 \left (2 a^2-b^2\right ) \left (1-\csc ^2(e+f x)\right )^{3/4} (d \sin (e+f x))^{3/2} \operatorname {EllipticF}\left (\frac {1}{2} \csc ^{-1}(\sin (e+f x)),2\right )}{3 d^2 f g (g \cos (e+f x))^{3/2}}+\frac {2 \left (a^2+b^2\right ) \sqrt {d \sin (e+f x)}}{3 d f g (g \cos (e+f x))^{3/2}}+\frac {4 a b (d \sin (e+f x))^{3/2}}{3 d^2 f g (g \cos (e+f x))^{3/2}} \]
[In]
[Out]
Rule 238
Rule 243
Rule 281
Rule 335
Rule 342
Rule 468
Rule 2643
Rule 2990
Rule 3281
Rubi steps \begin{align*} \text {integral}& = \frac {(2 a b) \int \frac {\sqrt {d \sin (e+f x)}}{(g \cos (e+f x))^{5/2}} \, dx}{d}+\int \frac {a^2+b^2 \sin ^2(e+f x)}{(g \cos (e+f x))^{5/2} \sqrt {d \sin (e+f x)}} \, dx \\ & = \frac {4 a b (d \sin (e+f x))^{3/2}}{3 d^2 f g (g \cos (e+f x))^{3/2}}+\frac {\cos ^2(e+f x)^{3/4} \text {Subst}\left (\int \frac {a^2+b^2 x^2}{\sqrt {d x} \left (1-x^2\right )^{7/4}} \, dx,x,\sin (e+f x)\right )}{f g (g \cos (e+f x))^{3/2}} \\ & = \frac {2 \left (a^2+b^2\right ) \sqrt {d \sin (e+f x)}}{3 d f g (g \cos (e+f x))^{3/2}}+\frac {4 a b (d \sin (e+f x))^{3/2}}{3 d^2 f g (g \cos (e+f x))^{3/2}}-\frac {\left (\left (-2 a^2+b^2\right ) \cos ^2(e+f x)^{3/4}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {d x} \left (1-x^2\right )^{3/4}} \, dx,x,\sin (e+f x)\right )}{3 f g (g \cos (e+f x))^{3/2}} \\ & = \frac {2 \left (a^2+b^2\right ) \sqrt {d \sin (e+f x)}}{3 d f g (g \cos (e+f x))^{3/2}}+\frac {4 a b (d \sin (e+f x))^{3/2}}{3 d^2 f g (g \cos (e+f x))^{3/2}}-\frac {\left (2 \left (-2 a^2+b^2\right ) \cos ^2(e+f x)^{3/4}\right ) \text {Subst}\left (\int \frac {1}{\left (1-\frac {x^4}{d^2}\right )^{3/4}} \, dx,x,\sqrt {d \sin (e+f x)}\right )}{3 d f g (g \cos (e+f x))^{3/2}} \\ & = \frac {2 \left (a^2+b^2\right ) \sqrt {d \sin (e+f x)}}{3 d f g (g \cos (e+f x))^{3/2}}+\frac {4 a b (d \sin (e+f x))^{3/2}}{3 d^2 f g (g \cos (e+f x))^{3/2}}-\frac {\left (2 \left (-2 a^2+b^2\right ) \left (1-\csc ^2(e+f x)\right )^{3/4} (d \sin (e+f x))^{3/2}\right ) \text {Subst}\left (\int \frac {1}{\left (1-\frac {d^2}{x^4}\right )^{3/4} x^3} \, dx,x,\sqrt {d \sin (e+f x)}\right )}{3 d f g (g \cos (e+f x))^{3/2}} \\ & = \frac {2 \left (a^2+b^2\right ) \sqrt {d \sin (e+f x)}}{3 d f g (g \cos (e+f x))^{3/2}}+\frac {4 a b (d \sin (e+f x))^{3/2}}{3 d^2 f g (g \cos (e+f x))^{3/2}}+\frac {\left (2 \left (-2 a^2+b^2\right ) \left (1-\csc ^2(e+f x)\right )^{3/4} (d \sin (e+f x))^{3/2}\right ) \text {Subst}\left (\int \frac {x}{\left (1-d^2 x^4\right )^{3/4}} \, dx,x,\frac {1}{\sqrt {d \sin (e+f x)}}\right )}{3 d f g (g \cos (e+f x))^{3/2}} \\ & = \frac {2 \left (a^2+b^2\right ) \sqrt {d \sin (e+f x)}}{3 d f g (g \cos (e+f x))^{3/2}}+\frac {4 a b (d \sin (e+f x))^{3/2}}{3 d^2 f g (g \cos (e+f x))^{3/2}}+\frac {\left (\left (-2 a^2+b^2\right ) \left (1-\csc ^2(e+f x)\right )^{3/4} (d \sin (e+f x))^{3/2}\right ) \text {Subst}\left (\int \frac {1}{\left (1-d^2 x^2\right )^{3/4}} \, dx,x,\frac {\csc (e+f x)}{d}\right )}{3 d f g (g \cos (e+f x))^{3/2}} \\ & = \frac {2 \left (a^2+b^2\right ) \sqrt {d \sin (e+f x)}}{3 d f g (g \cos (e+f x))^{3/2}}+\frac {4 a b (d \sin (e+f x))^{3/2}}{3 d^2 f g (g \cos (e+f x))^{3/2}}-\frac {2 \left (2 a^2-b^2\right ) \left (1-\csc ^2(e+f x)\right )^{3/4} \operatorname {EllipticF}\left (\frac {1}{2} \arcsin (\csc (e+f x)),2\right ) (d \sin (e+f x))^{3/2}}{3 d^2 f g (g \cos (e+f x))^{3/2}} \\ \end{align*}
Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.
Time = 0.57 (sec) , antiderivative size = 127, normalized size of antiderivative = 0.80 \[ \int \frac {(a+b \sin (e+f x))^2}{(g \cos (e+f x))^{5/2} \sqrt {d \sin (e+f x)}} \, dx=\frac {2 \left (15 a^2 \cos ^2(e+f x)^{3/4} \operatorname {Hypergeometric2F1}\left (\frac {1}{4},\frac {7}{4},\frac {5}{4},\sin ^2(e+f x)\right )+b \sin (e+f x) \left (10 a+3 b \cos ^2(e+f x)^{3/4} \operatorname {Hypergeometric2F1}\left (\frac {5}{4},\frac {7}{4},\frac {9}{4},\sin ^2(e+f x)\right ) \sin (e+f x)\right )\right ) \tan (e+f x)}{15 f g^2 \sqrt {g \cos (e+f x)} \sqrt {d \sin (e+f x)}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(424\) vs. \(2(159)=318\).
Time = 2.62 (sec) , antiderivative size = 425, normalized size of antiderivative = 2.67
method | result | size |
default | \(\frac {\sqrt {2}\, \left (2 \sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}\, \sqrt {-\csc \left (f x +e \right )+\cot \left (f x +e \right )+1}\, \sqrt {-\csc \left (f x +e \right )+\cot \left (f x +e \right )}\, F\left (\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}, \frac {\sqrt {2}}{2}\right ) a^{2} \cos \left (f x +e \right )-\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}\, \sqrt {-\csc \left (f x +e \right )+\cot \left (f x +e \right )+1}\, \sqrt {-\csc \left (f x +e \right )+\cot \left (f x +e \right )}\, F\left (\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}, \frac {\sqrt {2}}{2}\right ) b^{2} \cos \left (f x +e \right )+2 \sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}\, \sqrt {-\csc \left (f x +e \right )+\cot \left (f x +e \right )+1}\, \sqrt {-\csc \left (f x +e \right )+\cot \left (f x +e \right )}\, F\left (\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}, \frac {\sqrt {2}}{2}\right ) a^{2}-\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}\, \sqrt {-\csc \left (f x +e \right )+\cot \left (f x +e \right )+1}\, \sqrt {-\csc \left (f x +e \right )+\cot \left (f x +e \right )}\, F\left (\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}, \frac {\sqrt {2}}{2}\right ) b^{2}-2 \sqrt {2}\, a b \cos \left (f x +e \right )+\sqrt {2}\, a^{2} \tan \left (f x +e \right )+\sqrt {2}\, b^{2} \tan \left (f x +e \right )+2 \sqrt {2}\, a b \sec \left (f x +e \right )\right )}{3 g^{2} f \sqrt {g \cos \left (f x +e \right )}\, \sqrt {d \sin \left (f x +e \right )}}\) | \(425\) |
parts | \(\frac {a^{2} \sqrt {2}\, \left (2 \sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}\, \sqrt {-\csc \left (f x +e \right )+\cot \left (f x +e \right )+1}\, \sqrt {-\csc \left (f x +e \right )+\cot \left (f x +e \right )}\, F\left (\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}, \frac {\sqrt {2}}{2}\right ) \cos \left (f x +e \right )+2 \sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}\, \sqrt {-\csc \left (f x +e \right )+\cot \left (f x +e \right )+1}\, \sqrt {-\csc \left (f x +e \right )+\cot \left (f x +e \right )}\, F\left (\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}, \frac {\sqrt {2}}{2}\right )+\sqrt {2}\, \tan \left (f x +e \right )\right )}{3 f \sqrt {d \sin \left (f x +e \right )}\, \sqrt {g \cos \left (f x +e \right )}\, g^{2}}+\frac {b^{2} \sqrt {2}\, \left (-\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}\, \sqrt {-\csc \left (f x +e \right )+\cot \left (f x +e \right )+1}\, \sqrt {-\csc \left (f x +e \right )+\cot \left (f x +e \right )}\, F\left (\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}, \frac {\sqrt {2}}{2}\right ) \cos \left (f x +e \right )-\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}\, \sqrt {-\csc \left (f x +e \right )+\cot \left (f x +e \right )+1}\, \sqrt {-\csc \left (f x +e \right )+\cot \left (f x +e \right )}\, F\left (\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}, \frac {\sqrt {2}}{2}\right )+\sqrt {2}\, \tan \left (f x +e \right )\right )}{3 f \sqrt {d \sin \left (f x +e \right )}\, \sqrt {g \cos \left (f x +e \right )}\, g^{2}}+\frac {4 a b \sin \left (f x +e \right ) \tan \left (f x +e \right )}{3 f \sqrt {d \sin \left (f x +e \right )}\, \sqrt {g \cos \left (f x +e \right )}\, g^{2}}\) | \(462\) |
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.13 (sec) , antiderivative size = 147, normalized size of antiderivative = 0.92 \[ \int \frac {(a+b \sin (e+f x))^2}{(g \cos (e+f x))^{5/2} \sqrt {d \sin (e+f x)}} \, dx=-\frac {{\left (2 \, a^{2} - b^{2}\right )} \sqrt {i \, d g} \cos \left (f x + e\right )^{2} F(\arcsin \left (\cos \left (f x + e\right ) + i \, \sin \left (f x + e\right )\right )\,|\,-1) + {\left (2 \, a^{2} - b^{2}\right )} \sqrt {-i \, d g} \cos \left (f x + e\right )^{2} F(\arcsin \left (\cos \left (f x + e\right ) - i \, \sin \left (f x + e\right )\right )\,|\,-1) - 2 \, {\left (2 \, a b \sin \left (f x + e\right ) + a^{2} + b^{2}\right )} \sqrt {g \cos \left (f x + e\right )} \sqrt {d \sin \left (f x + e\right )}}{3 \, d f g^{3} \cos \left (f x + e\right )^{2}} \]
[In]
[Out]
Timed out. \[ \int \frac {(a+b \sin (e+f x))^2}{(g \cos (e+f x))^{5/2} \sqrt {d \sin (e+f x)}} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {(a+b \sin (e+f x))^2}{(g \cos (e+f x))^{5/2} \sqrt {d \sin (e+f x)}} \, dx=\int { \frac {{\left (b \sin \left (f x + e\right ) + a\right )}^{2}}{\left (g \cos \left (f x + e\right )\right )^{\frac {5}{2}} \sqrt {d \sin \left (f x + e\right )}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {(a+b \sin (e+f x))^2}{(g \cos (e+f x))^{5/2} \sqrt {d \sin (e+f x)}} \, dx=\text {Timed out} \]
[In]
[Out]
Timed out. \[ \int \frac {(a+b \sin (e+f x))^2}{(g \cos (e+f x))^{5/2} \sqrt {d \sin (e+f x)}} \, dx=\int \frac {{\left (a+b\,\sin \left (e+f\,x\right )\right )}^2}{{\left (g\,\cos \left (e+f\,x\right )\right )}^{5/2}\,\sqrt {d\,\sin \left (e+f\,x\right )}} \,d x \]
[In]
[Out]